package com.iker.desarrollo.acciones;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ipartek.desarrollo.bean.Catalogo;
import com.ipartek.desarrollo.dao.CatalogoDAO;

public class MostrarCatalogos extends Accion {

	@Override
	public String ejecutar(HttpServletRequest request,
			HttpServletResponse response) {

		// Codigo con Hibernate
		CatalogoDAO catalogoDAO = new CatalogoDAO();
		List<Catalogo> catalogos = catalogoDAO.ListarCatalogos();

		request.setAttribute("catalogos", catalogos);
		return "mostrarCatalogos.jsp";
	}

}
